home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
s
/
supremov3.00a1.dms
/
supremov3.00a1.adf
/
S
/
Print_DB.sm
< prev
next >
Wrap
Text File
|
1992-04-01
|
2KB
|
44 lines
/*******************************************************************************
*
* Print_DB.sm Copyright (c) 9.01.1995, K. Wojcieszek
*
* Program uruchomiony pod SuperMemo v2.03 (lub nowszym) wypisuje
* tekst pytania i odpowiedzi do edytora AmiTekst PRO (AmiTekst_port),
* lub innego wyposaûonego w port Arexx-a.
*
* Wersja 1.00
*
*******************************************************************************/
OPTIONS RESULTS
ADDRESS 'rexx_sm'
CR = '0A'X /* CR - znak koïca linii */
sm_to_edit /* Przejdú w tryb przeglâdania */
sm_set 1 /* Ustaw sië na jednostce nr 1 */
sm_num; n = RESULT /* Sprawdú ile jest wszystkich jedn. */
DO l = 1 TO n
sm_get_q; question = RESULT /* Weú tekst kolejnego pytania */
sm_get_a; answer = RESULT /* Weú tekst kolejnej odpowiedzi */
sm_get_rep; rep = RESULT /* Weú informacje o powtórkach */
question = 'Q: ' || question /* Formatowanie pytania */
i = index(question, CR)
DO while i > 0
question = insert('Q: ', question, i)
i = index(question, CR, i+1)
END
answer = 'A: ' || answer /* Formatowanie odpowiedzi */
i = index(answer, CR)
DO while i > 0
answer = insert('A: ', answer, i)
i = index(answer, CR, i+1)
END
item = question || CR || answer || CR || rep || CR || CR
ADDRESS "AmiTekst_port" Text item /* Wstaw tekst jednostki edytora */
sm_next /* Przejdú na nastëpnâ jednostkë */
if RESULT = 'RESULT' then LEAVE
END
sm_to_end /* Zamknij okno przeglâdania */